{include file="public/header"}
<body>
	<div class="sectionY">
		<a href="javascript:history.back();">
			<img src="__PUBLIC__/home/images/a19.png" alt="" class="a1">
		</a>
		<p class="p1">修改昵称</p>
	</div>
	<div class="kong1" style=""></div>
	<div class="res_section1">
		<form action="">
			<div class="f1 clearfix">
				<input type="text" id="nick_name" class="input1" value="{$user.nick_name}" placeholder="请输入昵称" style="text-indent: 1rem;">
			</div>
			<div class="sub">
				<input type="button" id="submit" value="确定">
			</div>
		</form>
	</div>
</body>
<script>
	$(function(){
		$("#submit").click(function () {
			let nick_name = $("#nick_name").val();
			if(nick_name == ""){
				modal.msg("昵称不能为空");
				return;
			}
			$.post(location.href, {nick_name:nick_name}, function (res) {
				modal.msg(res.result_info);
				if(res.result_code == 0){
					setTimeout(function () {
						history.back();
					}, 666);
				}
			});
		});
		
	})
</script>
</html>